package com.zl.aop.service2;

import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

/**
 * @author ZLL
 * @date create in 2018/05/09
 */

//@Aspect
//@Component
public class LoggingAspect {

    @AfterThrowing(pointcut = "execution(* com.zl.aop.service2.MyBizService.*(..))", throwing = "ex")
    public void logAfterThrowingAllMethods(Exception ex) throws Throwable {
        System.out.println("****LoggingAspect.logAfterThrowingAllMethods() " + ex);
    }
}